<?php

namespace App\Http\Middleware;

use App\Http\Controllers\Auth\JwtToken;
use Closure;

class Access
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        $access = new \App\Http\Controllers\Auth\Access();
        if(!$access->isAuth($request))
            return response()->json('没有权限操作改接口',401);
        return $next($request);
    }
}
